package cz.data.domain.market.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@TableName("market_api_log")
public class ApiLogEntity implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "调用api")
    private String apiId;
    @ApiModelProperty(value = "api名称")
    @TableField(exist = false)
    private String apiName;
    @ApiModelProperty(value = "调用者id")
    private String callerId;
    @ApiModelProperty(value = "调用者ip")
    private String callerIp;
    @ApiModelProperty(value = "调用url")
    private String callerUrl;
    @ApiModelProperty(value = "调用参数")
    private String callerParams;
    @ApiModelProperty(value = "调用数据量")
    private Integer callerSize;
    @ApiModelProperty(value = "调用耗时")
    private Long time;
    @ApiModelProperty(value = "信息记录")
    private String msg;
    @ApiModelProperty(value = "状态", notes = "0:失败，1：成功")
    private String status;
    @ApiModelProperty(value = "调用时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime callerDate;
}
